To understand that first we have to understand What is Internet site?
An internet site can be one of the following
Virtual Host (http only where the site contains host name(s) used to match the site, the host name that is used to match the site is specified by the incoming http request host header sent by the http client in the request).
Virtual Server (where the ip address the connection was accepted on is used to match the site). Only one internet site can define a specific ip address. The ip address cannot be duplicated in other site documents and an ip address is required if the site has tls/ssl enabled. Specifying the same ip address in two different internet sites documents leads to problems and ambiguous site matching. One cannot define two virtual servers with the same ip address.
Virtual Host and a Virtual Server where one configures a host and ip address. Again the ip address cannot be duplicated in any other site document
Now we will see how the matching rules work?
Domino Web site look up has always follows this order no matter if one is using internet sites or not , this is the case since Release 5.0 when virtual hosting was introduced into the http protocol and the product.
If protocol scheme is http
1. Look up virtual host (using the host header in the incoming http request)
2. if virtual host is not found look up virtual server (using the ip address the connection was accepted on)
3. if virtual server not found, use default site (if one is available, internet sites there may not be one configured, web configuration view there is always a default site)
So in this case the protocol is http three look ups are done, first we take the value of the host header and attempt to match a site (virtual host), if no match then we take the ip address the server accepted the connection on and attempt to find the ip address (virtual server), and finally we see if there is a default site. only if we fail all virtual host/virtual server lookups and there is no default site we send back an error 500 ('No matching web site').
If the protocol scheme is https
Number 2 and 3 only, we do not support virtual hosting over https.
How Its Working if duplicate Internet site present ?
For Example If site define as following
This is defining two virtual hosts site1 and site2 and is defining duplicate virtual servers which is not correct and not valid and will cause problems if virtual server matching is done.
Now if the document with site1 is deleted, that is only deleting the virtual host site1, it is not deleting virtual server 220.127.116.11 because virtual server 18.104.22.168 is duplicated in site 2 and since site1 DNS still maps to ip address 22.214.171.124 then site 2 internet site will be matched by the above logic and will match a virtual server.
Since there are two host names mapped to the same ip address in DNS, the configuration above is the same as defining one internet site document that looks like the following
site1, site2, 126.96.36.199 (virtual host site 1, virtual host site2 and virtual server 188.8.131.52)
Now by removing the name site1, if site1 still maps to ip address 184.108.40.206 it will still match the virtual server portion of the internet site doc.
In This scenario how to workaround the problem?
Keep the internet site 1 still active and redirect all requests to it to site two using a 301 redirection rule, many customers do this when they want to move to a different site/server.
so have the following site one (no ip address configured so only virtual host matching is enabled)
site1 - create a 301 redirect rule that redirect "/*" to "http://site2/*
that will force all requests to site one to go to site2 and the 301 tells the browser the redirect is permanent.
Have site1 configured so that all urls map to a single html page that sends back a page that has a friendly message
So create a internal redirect rule for site1 that changes all urls "/*" to point to a file "/mysite.html" where any type of message can be specified.
Please refer this publish document internet site document field what it talks about.
The use of Web Configuration/Internet sites is determined by the setting on the Basic Tab of the server document in the NAB. This setting as per server where as web sites may be configured across servers and can apply to all servers. When the http server starts it will print a console message as to what configuration mode is used.
To determine what the http server thinks it's configuration is, after starting the server give the command on server console "tell http dump config". This creates a httpcfg.txt file in the IBM_TECHNICAL_SUPPORT directory. This will list all the web sites that where read from the NAB. This is a simple text file that can be searched for specific hosts/ip addresses. It will also indicate if a internet site is a default site or not.
So to worked on website not working issues always need to collect httpcfg.txt file and a debug thread log on which gives us all of the necessary context to determine the site that is matched.
We need to determine if there is a problem in the site matching code or if there is a problem with the data read from the NAB (after the site is deleted) or if the problem lies somewhere else (like a compiler optimization issue). The site matching code has not changed so the issue may be with the documents in the NAB not being deleted (deleted from UI) but not deleted from the DB.
In this example, we have collected the must-gather data and see the following..
In httpcfg.txt files I see this web site, which defines a virtual host and two virtual server ip address, so we are matching the incoming ip address (virtual server).
So the assertion about not using IP addresses is not correct in so far as what I see in the configuration read from the nab..
Web Site Settings for Server Host(s): www.support.ibm.com
So the request below for example has a host header of www.support.ibm.com
, that will not match, however ip address "Server IP Address [192.168.xx.xx ]" will match the ip address defined above in the web site 192.168.xx.xx (virtual server match), so the code is working as designed and we are following this search order that I stated in matching rules
1. Attempt to find the virtual host name in one of the internet site documents, the host name used is specified by the incoming http Host: header.
2. If we fail on the above, the attempt to locate the ip address the connection was accepted on (virtual server) in one of the internet site docs. (matching virtual server)
3. If we fail on number 2 fall back to a default site (if using the Web Configuration view then there is always a default site, if using the internet site view there may/may not be a default site).
GET /fi10/fi10303p.nsf/FI10VImageView/SellFlatCMap/$file/ad-emap.png HTTP/1.1
Accept: image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; rv:11.0) like Gecko
Cookie: wbPgStepSize=0; wbPgTxtSize=0.9
*** Process Request: Session 1912, Thread 7f5ce53e9700, Clock 4121110791196944462
*** Client IP Address [10.73.28.106], Server IP Address [192.168.26.86]: Session 1912, Thread 7f5ce53e9700, Clock 4121110791196944462
I would like to thank here Mike Kerrigan
for helping and explaining how web site design works.